//
//  BgView.m
//  微他
//
//  Created by 微他 on 14-10-1.
//  Copyright (c) 2014年 微他. All rights reserved.
//`

#import "BgView.h"

@implementation BgView

- (instancetype)initWithFrame:(CGRect)frame text:(BgViewTextType)text
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor redColor];
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 90, 90)];
        imageView.center = CGPointMake(CGRectGetMidX(self.bounds), 136);
        imageView.contentMode = UIViewContentModeScaleAspectFit;
        imageView.image = [UIImage imageNamed:@"bgimage"];
        [self addSubview:imageView];
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(imageView.frame) + 16, CGRectGetWidth(self.bounds), 36)];
        label.text = [self text:text];
        label.textAlignment = NSTextAlignmentCenter;
//        [label setFont:[SetFontColorProperty setCustomFont:CustomTypeBoldFont Size:16.54]];
//        label.textColor = [SetFontColorProperty setFontColor:137 float2:135 float3:135];
        [self addSubview:label];
    }
    return self;
}

- (NSString *)text:(BgViewTextType)text
{
    switch (text) {
        case 0:
            return @"请完成基础信息";
            break;
        case 1:
            return @"暂无话题回复";
            break;
        case 2:
            return @"暂无举报信息";
            break;
        case 3:
            return @"无聊天记录";
            break;
        case 4:
            return @"黑名单为空";
            break;
        case 5:
            return @"暂未发表任何话题";
            break;
        case 6:
            return @"暂无任何消息";
            break;
        case 7:
            return @"暂未收到卡片";
            break;
        case 8:
            return @"暂无成员卡片";
            break;
        case 9:
            return @"该小组暂无话题";
            break;
        case 10:
            return @"暂无回复";
            break;
        case 11:
            return @"暂无提醒";
            break;
        case 12:
            return @"暂无话题信息";
            break;
        case 13:
            return @"暂无小组信息";
            break;
        case 14:
            return @"无用户照片";
            break;
        case 15:
            return @"无卡片信息";
            break;
        case 16:
            return @"无附近信息";
            break;
        case 17:
            return @"网络错误，稍后重试";
            break;
        case 18:
            return @"无消息";
            break;
        case 19:
            return @"暂无访客记录";
            break;
        default:
            break;
    }
}

@end
